<?php
class Pageley_Tag_Variable extends Pageley_Tag_Abstract {
    
    private $variableName;
    
    public function execute() {
    	$value = null;
    	if(array_key_exists($this->variableName, $_REQUEST)) {
    		$value = $_REQUEST[$this->variableName];
    	} else if(array_key_exists($this->variableName, $_SESSION)) {
            $value = $_SESSION[$this->variableName];
        }
    	return $value;
    }
    
    public function setVariableName($variableName) {
        $this->variableName = $variableName;
    }
}